<template>
	<view class='box'>
          <view class="conBox" v-for="(v,i) in list" :key="i" @click="toProjectInf(v.productId)">
            <view class="imgBox">
              <image :src="v.com_image"></image>
            </view>
            <view class="wenzi">
              <view>{{v.com_proName}}</view>
              <view class="line2">{{v.org_name}}</view>
              <view><text>￥{{v.com_presentPrice}}</text><text class="oldPrice">￥{{v.com_originalPrice}}</text></view>
            </view>
          </view>
        <!-- <view class="conBox">
          <view class="imgBox"><image src='https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201509%2F20%2F20150920010014_eFXxZ.gif&refer=http%3A%2F%2Fb-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1631435322&t=77c4e45948169dde0c0d2598f1b6923a'></image></view>
          <view class="wenzi">
            <view>男士体检套餐</view>
            <view class="line2">南方医科大学附属第三医院</view>
            <view><text>￥998</text><text class="oldPrice">￥1200</text></view>
          </view>
        </view>
        <view class="conBox">
          <view class="imgBox"><image src='https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201509%2F20%2F20150920010014_eFXxZ.gif&refer=http%3A%2F%2Fb-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1631435322&t=77c4e45948169dde0c0d2598f1b6923a'></image></view>
          <view class="wenzi">
            <view>男士体检套餐</view>
            <view class="line2">南方医科大学附属第三医院</view>
            <view><text>￥998</text><text class="oldPrice">￥1200</text></view>
          </view>
        </view>
        <view class="conBox">
          <view class="imgBox"><image src='https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201509%2F20%2F20150920010014_eFXxZ.gif&refer=http%3A%2F%2Fb-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1631435322&t=77c4e45948169dde0c0d2598f1b6923a'></image></view>
          <view class="wenzi">
            <view>男士体检套餐</view>
            <view class="line2">南方医科大学附属第三医院</view>
            <view><text>￥998</text><text class="oldPrice">￥1200</text></view>
          </view>
        </view>
        <view class="conBox">
          <view class="imgBox"><image src='https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201509%2F20%2F20150920010014_eFXxZ.gif&refer=http%3A%2F%2Fb-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1631435322&t=77c4e45948169dde0c0d2598f1b6923a'></image></view>
          <view class="wenzi">
            <view>男士体检套餐</view>
            <view class="line2">南方医科大学附属第三医院</view>
            <view><text>￥998</text><text class="oldPrice">￥1200</text></view>
          </view>
        </view>
    </view> -->
    </view>
</template>

<script>
	export default {
		data() {
			return {
          // 所有套餐的数组
          list:[]
			}
		},
		methods: {
      // 
      toProjectInf(id){
        console.log(444,id);
        uni.navigateTo({
        url: "/pages/ProjectInf/ProjectInf?id="+id,
      });
      },
      // 获取所有的套餐信息
      getAllPackages(){
        this.$http({
          url:'/getAllPackages',
        }).then((res)=>{
          // console.log(999,res.data);
          this.list=res.data
          console.log(111,this.list);
        })
      }
      
			
		},
    mounted(){
      //一进页面挂载就执行获取所有套餐的函数
      this.getAllPackages();
      
    }

	}
</script>

<style lang="less" scope>
.box{
    margin: 0 25rpx 0 15rpx;
}
.conBox{
    display: flex;
    margin-top: 20rpx;
    box-shadow: 10rpx 10rpx #b18888;
}
.imgBox{
    // border: 1rpx solid red;
    margin-right: 15rpx;

    image{
		width: 200rpx;
		height: 200rpx;
		border: 1rpx solid yellow;
    }
}
.wenzi{
    flex: 1;
    // border: 1rpx solid blue;
    padding: 10rpx;
    
    view{
        margin-top: 20rpx;
    }
}
.line2{
    color:#978888;
}
.oldPrice{
    color:rgb(151, 136, 136);
    margin-left: 30rpx;
    text-decoration:line-through;
}
</style>
